#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	int i, t, n, m, x, y;
	scanf("%d", &t);
	for (i = 0; i < t; i++)
	{
		scanf("%d %d", &n, &m);
		y = (m - 2 * n) / 2;
		x = n - y;
		if (x < 0 || y < 0 || m % 2 != 0) printf("No answer\n");
		else printf("%d %d\n", x, y);
	}


	return 0;
}
//1222